package com.example.controller.department;

import com.example.pojo.department.Dept;
import com.example.service.impl.department.DeptServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 部门表的展示
 * @author 小苏
 * @ClassName:DeptController
 * @description: TODO
 * @data 2022/12/9 9:13
 * @version: 1.0
 **/
@CrossOrigin
@RestController
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    private DeptServiceImpl deptService;
    @ResponseBody
    @RequestMapping("/getdept")
    public List<Dept> getAll(){
        return deptService.getCha();
    }
    @ResponseBody
    @RequestMapping("/get")
    public void getSAkk(){
        System.out.println("123");
    }
}
